<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.2</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="/css/font.css">
        <link rel="stylesheet" href="/css/xadmin.css">
        <link rel="stylesheet" href="/css/style0.css">
        <script src="/lib/layui/layui.js" charset="utf-8"></script>
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
        <style>
            .layui-btn-primary {
                border: 0px solid #C9C9C9;
                background-color: #fff;
                color: #555;
            }
            .layui-card-body{
                text-align: center;
            }
            .layui-card-body span{
                line-height: 30px;
            }
        </style>
    </head>
    <body>
    <div class="layui-fluid" id="divvuehtml">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">工作信息中心-公告信息</div>
                    <div class="layui-card-body ">
                        <div class="layui-collapse" lay-accordion>
                            <div class="layui-colla-item" v-for="(s,index) in menuItems">
                                <h2 class="layui-colla-title">{{s.title}}</h2>
                                <div class="layui-colla-content layui-show">{{s.content}}</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
       </div>
    </div>
    </body>
    <script src="https://cdn.bootcss.com/echarts/4.2.1-rc1/echarts.min.js"></script>
    <script src="/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/js/vue.js"></script>
    <script type="text/javascript" src="/js/xadmin.js"></script>
    <script>

        layui.use(['laydate','form','layer'],function() {
            var form = layui.form;
            var layer = layui.layer;
            var laydate = layui.laydate;
            //执行一个laydate实例
            laydate.render({
                elem: '#test1', //指定元素
                value: new Date(1534766888000)
            });
        })



        var ve = new Vue({
            el: '#divvuehtml',//绑定vue渲染范围
            data: {
                menuItems: {},//初始化菜单资源list
            },
            created: function () {//vue在打开html前初始化创建函数
                this.inin();  //初始化菜单效果
            },
            mounted: function () {//初始化html完成后在进行操作
            },
            methods: {//调用函数
                inin :function (){
                    $.get("/api/admin/notice/list?page=1&rows=100",{},function(data){
                         if(data.success){
                             if(data.data!=null){
                                 ve.menuItems = data.data.records;
                             }
                         }else{
                             layui.use(['layer'], function(){
                                 var layer = layui.layer;
                                 xadmin.alert(data.msg,{icon:5})
                             })
                         }

                    },"json")
                }
            },updated: function () {
                layui.use(['element'], function(){
                    var element = layui.element;
                    element.render();
                })
            }
        })
    </script>

</html>
